#include<func.h>
#include<mysql/mysql.h>

int main()
{
    MYSQL* mysql=mysql_init(NULL);
    if(mysql==NULL)
    {
        printf("%s\n",mysql_error(mysql));
    }

    if(!mysql_real_connect(mysql,"localhost","root","123456","homework",0,NULL,0))
    {
        printf("%s\n",mysql_error(mysql));
    }

    int ret=mysql_query(mysql,"delete  from s  where name='大司马' "); 
    if(ret==0)
        printf("执行成功\n");
    else
        printf("执行失败\n");

}
